<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="qingke.blog.dao.BlogDao" %>    
<%@ page import="qingke.blog.pojo.Article" %>    
<%@ page import="java.util.List" %> 
<%@ page import=" java.io.File " %>   
<%@ page import=" java.io.FileReader" %>   
<%@ page import=" java.io.BufferedReader" %>   
<%@ page import=" java.io.FileReader" %>  
<%@ page import=" java.util.ArrayList" %>     
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
		<title>Striped </title>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,700|Open+Sans+Condensed:300,700" rel="stylesheet" />
		<script src="js/jquery-1.8.3.min.js"></script>
		<script src="css/5grid/init.js?use=mobile,desktop,1200px,1000px&amp;mobileUI=1&amp;mobileUI.theme=none"></script>
		<noscript>
		    <link rel="stylesheet" href="css/5grid/core.css" />
			<link rel="stylesheet" href="css/5grid/core-desktop.css" />
			<link rel="stylesheet" href="css/5grid/core-1200px.css" />
			<link rel="stylesheet" href="css/5grid/core-noscript.css" />
			<link rel="stylesheet" href="css/style.css" />
			<link rel="stylesheet" href="css/style-desktop.css" />
			<link rel="stylesheet" href="css/style-1200px.css" />
		</noscript>
<script type="text/javascript">
function validate(){
	if(ha.username.value==""){
		alert("用户名不能为空");	
		return false;
	}
	if(ha.username.value.indexOf(",")>-1||ha.username.value.indexOf("，")>-1){
		alert("用户名不能包含逗号");	
		return false;
	}
	if(ha.password.value==""){
		alert("密码不能为空");	
		return false;
	}
}
</script>
	</head>
	<body class="left-sidebar">
	    <form action="ValidateServlet"  method="post" onsubmit="return validate()" name="ha">
        <a>用户名:</a><input name="username">
		<a>密码:</a><input type="password" name ="password"><br>
		<input type="submit" value="登录"  >
		<input type="button" value="注册" onclick="window.location.href='Register.html'">
		</form>
        <div align=center>
		<!-- Wrapper -->
        <div align=center>
<div style=“width:960px; margin:0 auto; height:90px;”>
<script>
(function() {
    var s = "_" + Math.random().toString(36).slice(2);
    document.write('<div id="' + s + '"></div>');
    (window.slotbydup=window.slotbydup || []).push({
        id: '730419',
        container: s,
        size: '960,90',
        display: 'inlay-fix'
    });
})();
</script>
</div>
</div>
			<div id="wrapper">

				<!-- Content -->
					<div id="content" class="mobileUI-main-content">
						<div id="content-inner">
					
							<!-- Post -->
								<article class="is-post is-post-excerpt">
									<header>
										<h2><a href="#">Welcome to Striped</a></h2>
										<span class="byline">A free, fully responsive HTML5 site template by AJ for HTML5 Up!</span>
									</header>
									<div class="info">
										<span class="date"><span class="month">Jan<span>uary</span></span> <span class="day">14</span><span class="year">, 2013</span></span>
										<ul class="stats">
											<li><a href="#" class="link-icon24 link-icon24-1">16</a></li>
											<li><a href="#" class="link-icon24 link-icon24-2">32</a></li>
											<li><a href="#" class="link-icon24 link-icon24-3">64</a></li>
											<li><a href="#" class="link-icon24 link-icon24-4">128</a></li>
										</ul>
									</div>
									<a href="#" class="image image-full"><img src="images/n33-robot-invader.jpg" alt="" /></a>
									<p>
										<strong>Hello!</strong> You're looking at <a href="#striped/">Striped</a>, a fully responsive HTML5 site template designed by AJ
										for <a href="http://www.huiyi8.com/" title="huiyi8素材网">huiyi8素材网</a> It features a clean, minimalistic design, styling for all basic page elements (including blockquotes, tables and lists), a
										repositionable sidebar (left or right), and HTML5/CSS3 code designed for quick and easy customization (see code comments for details).
									</p>
									<p>
										Striped is released for free under the <a href="#">Creative Commons Attribution license</a> so feel free to use it for personal projects
										or even commercial ones &ndash; just be sure to credit <a href="http://www.huiyi8.com/" title="huiyi8素材网">huiyi8素材网</a> for the design. If you like what you see here, be sure to check out
										<a href="http://www.huiyi8.com/" title="huiyi8素材网">huiyi8素材网</a> for more cool designs or follow me on <a href="#">Twitter</a> for new releases and updates.
									</p>
								</article>
						
							<!-- Post -->
								<article class="is-post is-post-excerpt">
									<header>
										<h2><a href="#">Lorem ipsum dolor sit amet</a></h2>
										<span class="byline">Feugiat interdum sed commodo ipsum consequat dolor nullam metus</span>
									</header>
									<div class="info">
										<span class="date"><span class="month">Jan<span>uary</span></span> <span class="day">8</span><span class="year">, 2013</span></span>
										<ul class="stats">
											<li><a href="#" class="link-icon24 link-icon24-1">12</a></li>
											<li><a href="#" class="link-icon24 link-icon24-2">24</a></li>
											<li><a href="#" class="link-icon24 link-icon24-3">48</a></li>
											<li><a href="#" class="link-icon24 link-icon24-4">96</a></li>
										</ul>
									</div>
									<a href="#" class="image image-full"><img src="images/fotogrph-dark-stairwell.jpg" alt="" /></a>
									<p>
										Quisque vel sapien sit amet tellus elementum ultricies. Nunc vel orci turpis. Donec id malesuada metus. 
										Nunc nulla velit, fermentum quis interdum quis, tate etiam commodo lorem ipsum dolor sit amet dolore. 
										Quisque vel sapien sit amet tellus elementum ultricies. Nunc vel orci turpis. Donec id malesuada metus. 
										Nunc nulla velit, fermentum quis interdum quis, convallis eu sapien. Integer sed ipsum ante.
									</p>
								</article>
											<% 
								  BlogDao bd =new BlogDao();
								  List<Article> list =bd.getAllArticle();
								  if(list!=null){
									  for(Article at:list ){
										  File file=new File("D:/eclipse/Blog/WebContent/article/"+at.getContentPath());
										  BufferedReader bf =new BufferedReader(new FileReader(file));
										  List<String> lines =new ArrayList<String>();
										  String line=null;
										  while((line=bf.readLine())!=null){
											  lines.add(line);
										  }
										  bf.close();
							
								%>
								<article class="is-post is-post-excerpt">
									<header>
										<h2><a href="#" ><%=at.getArticleName() %></a></h2>
									</header>
									<div class="info">
										<span class="date"><span class="month"><%=at.getMonth()%><span>uary</span></span> 
										<span class="day"><%=at.getDate().getDate() %>
										</span><span class="year"><%=at.getDate().getYear()+1900%></span></span>
										<ul class="stats">
											<li><a href="#" class="link-icon24 link-icon24-1">12</a></li>
											<li><a href="#" class="link-icon24 link-icon24-2">24</a></li>
											<li><a href="#" class="link-icon24 link-icon24-3">48</a></li>
											<li><a href="#" class="link-icon24 link-icon24-4">96</a></li>
										</ul>
									</div>
									<a href="#" class="image image-full"><img src="" alt="" /></a>
						        <%
						            for(String le:lines){
						            	%>
						            	<p><%=le%></p>
						            	<% 
						            }
						        %>
						        </article>
						        <%
						        }
						        }
						     %>
						
							<!-- Pager -->
								<div class="pager">
									<!--<a href="#" class="button previous">Previous Page</a>-->
									<div class="pages">
										<a href="#" class="active">1</a>
										<a href="#">2</a>
										<a href="#">3</a>
										<a href="#">4</a>
										<span>&hellip;</span>
										<a href="#">20</a>
									</div>
									<a href="#" class="button next">Next Page</a>
								</div>

						</div>
					</div>

				<!-- Sidebar -->
					<div id="sidebar">
					
						<!-- Logo -->
							<div id="logo">
								<h1 class="mobileUI-site-name">STRIPED</h1>
							</div>
					
						<!-- Nav -->
							<nav id="nav" class="mobileUI-site-nav">
								<ul>
									<li class="current_page_item"><a href="#">Latest Post</a></li>
									<li><a href="#">Archives</a></li>
									<li><a href="#">About Me</a></li>
									<li><a href="#">Contact Me</a></li>
								</ul>
							</nav>

						<!-- Search -->
							<section class="is-search is-first">
								<form method="post" action="#">
									<input type="text" class="text" name="search" placeholder="Search" />
								</form>
							</section>
					
						<!-- Text -->
							<section class="is-text-style1">
								<div class="inner">
									<p>
									</p>
								</div>
							</section>
					
						<!-- Recent Posts -->
							<section class="is-recent-posts">
								<header>
									<h2>Recent Posts</h2>
								</header>
								<ul>
									<li><a href="#">Nothing happened</a></li>
									<li><a href="#">My Dearest Cthulhu</a></li>
									<li><a href="#">The Meme Meme</a></li>
									<li><a href="#">Now Full Cyborg</a></li>
									<li><a href="#">Temporal Flux</a></li>
								</ul>
							</section>
					
						<!-- Recent Comments -->
							<section class="is-recent-comments">
								<header>
									<h2>Recent Comments</h2>
								</header>
								<ul>
									<li>case on <a href="#">Now Full Cyborg</a></li>
									<li>molly on <a href="#">Untitled Post</a></li>
									<li>case on <a href="#">Temporal Flux</a></li>
								</ul>
							</section>
					
						<!-- Calendar -->
							<section class="is-calendar">
								<div class="inner">
									<table>
										<caption>February 2013</caption>
										<thead>
											<tr>
												<th scope="col" title="Monday">M</th>
												<th scope="col" title="Tuesday">T</th>
												<th scope="col" title="Wednesday">W</th>
												<th scope="col" title="Thursday">T</th>
												<th scope="col" title="Friday">F</th>
												<th scope="col" title="Saturday">S</th>
												<th scope="col" title="Sunday">S</th>
											</tr>
										</thead>
										<tbody>
											<tr>
												<td colspan="4" class="pad"><span>&nbsp;</span></td>
												<td><span>1</span></td>
												<td><span>2</span></td>
												<td><span>3</span></td>
											</tr>
											<tr>
												<td><span>4</span></td>
												<td><span>5</span></td>
												<td><a href="#">6</a></td>
												<td><span>7</span></td>
												<td><span>8</span></td>
												<td><span>9</span></td>
												<td><a href="#">10</a></td>
											</tr>
											<tr>
												<td><span>11</span></td>
												<td><span>12</span></td>
												<td><span>13</span></td>
												<td class="today"><a href="#">14</a></td>
												<td><span>15</span></td>
												<td><span>16</span></td>
												<td><span>17</span></td>
											</tr>
											<tr>
												<td><span>18</span></td>
												<td><span>19</span></td>
												<td><span>20</span></td>
												<td><span>21</span></td>
												<td><span>22</span></td>
												<td><a href="#">23</a></td>
												<td><span>24</span></td>
											</tr>
											<tr>
												<td><a href="#">25</a></td>
												<td><span>26</span></td>
												<td><span>27</span></td>
												<td><span>28</span></td>
												<td class="pad" colspan="3"><span>&nbsp;</span></td>
											</tr>
										</tbody>
									</table>
								</div>
							</section>

						<!-- Copyright -->
							<div id="copyright">
								<p>
									&copy; 2013 An Untitled Site <a target="_blank" href="http://www.huiyi8.com/moban/">网页模板</a>.
								</p>
							</div>
					
					</div>

			</div>

<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
</body>
</html>